package com.candy.common.exception;

import org.springframework.http.HttpStatus;

/**
 * 自定义异常
 * @author Lenovo
 */
public class BaseException extends RuntimeException
{
	private static final long serialVersionUID = 1L;

	private HttpStatus code;

	private String message;

	public BaseException(String message)
	{
		this.message = message;
	}

	public BaseException(String message, HttpStatus code)
	{
		this.message = message;
		this.code = code;
	}

	public BaseException(String message, Throwable e)
	{
		super(message, e);
		this.message = message;
	}

	@Override
	public String getMessage()
	{
		return message;
	}

	public HttpStatus getCode()
	{
		return code;
	}
}
